<?php

/**
 * 第三方登录相关配置
 *
 * @date 2018-11-15
 * @author zx
 * @var array
 */
return [
    /**
     * 微信公众号相关
     */
    'gzh' => [
        'appid' => env("WECHAT_APPID", NULL),
        'secret' => env("WECHAT_SECRET", NULL),
        'grant_type' => 'authorization_code',
        'lang' => 'zh_CN',
        'uri' => [
            'request_uri' => 'https://api.weixin.qq.com/sns/oauth2/access_token',
            'userinfo_uri' => 'https://api.weixin.qq.com/cgi-bin/user/info',
        ]
    ],

    /**
     * 微信小程序相关
     */
    'xcx' => [
        'appid' => env("SP_APPID", NULL),
        'secret' => env("SP_SECRET", NULL),
        'grant_type' => 'authorization_code',
        'uri' => [
            'request_uri' => 'https://api.weixin.qq.com/sns/jscode2session',
        ]
    ],

    /**
     * qq相关
     */
    'qq' => [
        'appid' => env("QQ_APPID", NULL),
        'secret' => env("QQ_CLIENT_SECRET", NULL),
        'grant_type' => 'authorization_code',
        'uri' => [
            'redirect_uri' => config("system.cdn_domain", ''),
            'request_uri' => 'https://graph.qq.com/oauth2.0/me',
            'token_uri' => 'https://graph.qq.com/oauth2.0/token',
            'userinfo_uri' => 'https://graph.qq.com/user/get_user_info'
        ],
    ],

    /**
     * 微博相关
     */
    'weibo' => [
        'appid' => env("WEIBO_APPID", NULL),
        'secret' => env("WEIBO_CLIENT_SECRET", NULL),
        'grant_type' => 'authorization_code',
        'uri' => [
            'redirect_uri' => config("system.cdn_domain", ''),
            'token_uri' => 'https://api.weibo.com/oauth2/access_token',
            'request_uri' => 'https://api.weibo.com/2/eps/user/info.json',
        ]
    ]

];